<extend name="Layout:base_edit" />
<block name="body_content_block">
    <taglib name="Common\TagLib\Sohtml"/>
    <form action="{:U('Admin/save_admin_json')}" method="post">
        <table>
            <tr>
                <th>租户ID：</th>
                <td><input class="easyui-combobox" id="siteID" name="siteID" title="请选择租户" data-url="{:U('Admin/get_siteid_json')}" value="{$data.siteID}" /></td></tr>
            <tr>
                <th>用户名：</th>
                <td><input type="text" name="userName" placeholder="请输入用户名" required="required" value="{$data.userName}"/></td>
            </tr>
            <tr>
                <th>密码：</th>
                <td><input type="password" name="password" placeholder="请输入密码" value="{$data.password}" required="required"/></td>
            </tr>
            <tr>
                <th>任务最大数量：</th>
                <td><input type="text" name="maxTask" placeholder="请输入任务最大数量" required="required" value="{$data.maxTask}"/></td>
            </tr>
            <tr>
                <th>通话清单最大保留时间：</th>
                <td><input type="text" name="keepCallHistoryDays" placeholder="请输入通话清单最大保留时间" required="required" value="{$data.keepCallHistoryDays}"/></td>
            </tr>
            <tr>
                <th>录音最大保留时间：</th>
                <td><input type="text" name="keepRecordHistoryDays" placeholder="请输入录音最大保留时间" required="required" value="{$data.keepRecordHistoryDays}"/></td>
            </tr>
            <tr>
                <th>呼出使用费率：</th>
                <td><input class="easyui-combobox" id="outFeeRate" name="outFeeRate" data-url="{:U('PayFee/get_payfee_list_fit_json')}" value="{$data.outFeeRate}" title="请选择呼出使用费率" /></td>
            </tr>
            <tr>
                <th>呼入使用费率：</th>
                <td><input class="easyui-combobox" id="inFeeRate" name="inFeeRate" title="请选择呼入使用费率" value="{$data.inFeeRate}" /></td>
            </tr>
            <tr>
                <th>短信使用费率：</th>
                <td><input class="easyui-combobox" id="smsFeeRate" name="smsFeeRate" title="请选择短信使用费率" value="{$data.smsFeeRate}" /></td>
            </tr>
            <tr>
                <th>可透支金额：</th>
                <td><input type="text" name="allowOverdraftAmount" placeholder="请输入可透支金额" value="{$data.allowOverdraftAmount}" required="required"/></td>
            </tr>
            <tr>
                <th>付费类型：</th>
                <td><sohtml:radio name="payType" items="1=预付费;0=后付费" value="{$data.payType|default=1}" /></td>
            </tr>
            <tr>
                <th>状态：</th>
                <td><sohtml:radio name="state" items="1=正常;0=禁用" value="{$data.state|default=1}" /></td>
            </tr>
        </table>
        <input type="hidden" name="id" value="{$data.id}" />
    </form>  
</block>
<block name="body_after_block">
    <script type="text/javascript">        
        item_form.resize_owner_dialog({width:338});
        item_form.combobox('#outFeeRate, #inFeeRate, #smsFeeRate', {url: $('#outFeeRate').data('url')}, '没有费率记录')
        item_form.combobox('#siteID', {disabled: $('[name="id"]').val()}, '没有可用租户ID');
    </script>
</block>